<!DOCTYPE html>
<html style="font-size: 23.4375px;">
<head>
    <include file="./public/header.html"/>

<body style="font-size: 21.7589px;">
<div id="app">
    <div id="shadow" style="display: none;"></div>
    <header class="top"><span style="display: none;">加载中...</span> <span>安全中心</span> <!---->
        <div class="iconfont back" style="display: none;"></div>
        <a href="./userCenter.html" class="iconfont back"></a></header>

    <div data-v-777c40c8="" class="main" s="[object Object]">
        <div data-v-777c40c8="" class="safeTop">
            <h5 data-v-777c40c8="">
                <span data-v-777c40c8=""></span>
                    <em data-v-777c40c8="" id="Slevel" style="display: none">您的账号安全级别为低</em>
                    <em data-v-777c40c8="" id="Sleve2" style="display: none">您的账号安全级别为中</em>
                    <em data-v-777c40c8="" id="Sleve3" style="display: none">您的账号安全级别为高</em>
                <span data-v-777c40c8=""></span>
            </h5>
           <input type="hidden" id="pwd" value="<?php echo trim($info['logonpass']); ?>">
            <div data-v-777c40c8="" class="star">
                <i data-v-777c40c8="" id="level" class="iconfont icon "></i>
                <i data-v-777c40c8="" id="leve2" class="iconfont icon "></i>
                <i data-v-777c40c8="" id="leve3" class="iconfont icon"></i>
                <i data-v-777c40c8="" id="leve4" class="iconfont icon"></i>
                <i data-v-777c40c8="" id="leve5" class="iconfont icon"></i>
            </div>
            <p data-v-777c40c8="" id="LoginInfo">上次登录：<?php echo $_SESSION['last_time'];?><br data-v-777c40c8="">
                <?php echo $adr['city'];?> | <a href="{:U('Users/verifyPwd')}" class="" data-v-777c40c8="">不是我登录?</a>
            </p>
        </div>
        <div data-v-777c40c8="" class="options">
            <a href="{:U('Users/verifyPwd')}" class="active" data-v-777c40c8=""><span data-v-777c40c8="">修改登录密码</span>
                <i data-v-777c40c8="" class="fr">修改
                    <span data-v-777c40c8="" class="iconfont right"></span>
                </i>
            </a>

            <p data-v-777c40c8="" class="hr1px"></p>
            <?php if(trim($info['insurepass'])==""){ ?>
                <a href="{:U('Users/setSafePwd')}" class="active" data-v-777c40c8="">
                    <span data-v-777c40c8="">未设置安全密码</span>
                    <i data-v-777c40c8="" class="fr">设置
                        <span data-v-777c40c8="" class="iconfont right"></span>
                    </i>
                </a>
            <?php }else{ ?>
                <a href="{:U('Users/setSafePwd_upd')}" class="active" data-v-777c40c8="">
                    <span data-v-777c40c8="">已设置安全密码</span>
                    <i data-v-777c40c8="" class="fr">修改
                        <span data-v-777c40c8="" class="iconfont right"></span>
                    </i>
                </a>
            <?php }?>

            <p data-v-777c40c8="" class="hr1px"></p>
            <?php if(trim($info['mobile'])==""){ ?>
            <a href="{:U('Users/setMobile')}" class="active" data-v-777c40c8="">
                <span data-v-777c40c8="">设置密保手机</span>
                <i data-v-777c40c8="" class="fr">设置
                    <span data-v-777c40c8="" class="iconfont right"></span>
                </i>
            </a>
            <?php }else{ ?>
            <a href="{:U('Users/setMobile2')}" class="active" data-v-777c40c8="">
                <span data-v-777c40c8="">已设置密保手机</span>
                <i data-v-777c40c8="" class="fr">修改
                    <span data-v-777c40c8="" class="iconfont right"></span>
                </i>
            </a>
            <?php }?>





            <p data-v-777c40c8="" class="hr1px"></p>
            <?php if(empty($dat)){ ?>
                <a href="{:U('Users/setQuestion')}" class="active" data-v-777c40c8="">
                    <span data-v-777c40c8="">设置密保问题</span>
                    <i data-v-777c40c8="" class="fr">设置
                        <span data-v-777c40c8="" class="iconfont right"></span>
                    </i>
                </a>
            <?php }else{ ?>
                <a href="{:U('Users/verifyQuestion')}" class="active" data-v-777c40c8="">
                    <span data-v-777c40c8="">已设置密保问题</span>
                    <i data-v-777c40c8="" class="fr">修改
                        <span data-v-777c40c8="" class="iconfont right"></span>
                    </i>
                </a>
            <?php }?>



            <p data-v-777c40c8="" class="hr1px"></p>
            <?php if(trim($info['email'])==""){ ?>
              <a href="{:U('Users/setMail')}" class="active" data-v-777c40c8="">
                  <span data-v-777c40c8="">设置密保邮箱</span>
                  <i data-v-777c40c8="" class="fr">设置
                      <span data-v-777c40c8="" class="iconfont right"></span>
                  </i>
              </a>
            <?php }else{ ?>
            <a href="{:U('Users/setMail2')}" class="active" data-v-777c40c8="">
                <span data-v-777c40c8="">已设置密保邮箱</span>
                <i data-v-777c40c8="" class="fr">修改
                    <span data-v-777c40c8="" class="iconfont right"></span>
                </i>
            </a>
            <?php }?>





            <p data-v-777c40c8="" class="hr1px"></p>
            <a href="{:U('Users/manageBankcard2')}"  data-v-777c40c8="" class="active">
                <span data-v-777c40c8="">银行卡管理</span>
                <i data-v-777c40c8="" class="fr">设置
                    <span data-v-777c40c8="" class="iconfont right"></span>
                </i>
            </a>
        </div>
        <div data-v-777c40c8="" class="options" >
            <a data-v-777c40c8="" id="loginOut" class="active" href="{:U('Index/logout')}">
                <span data-v-777c40c8="">退出登录</span>
                <i data-v-777c40c8="" class="fr">
                    <span data-v-777c40c8=""class="iconfont right"></span>
                </i>
            </a>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
    window.onload = function() {
        var pwd = $("#pwd").val();
        var re1 =/^\d+$/;
        var result=  re1.test(pwd);

        if (pwd.length<=6) {
            $("#Slevel").show();
            $('#level').addClass('curr');
            return;
            //密码小于六位且是纯数字的时候，密码强度为低
        }

        if(result){
            $("#Slevel").show();
            $('#level').addClass('curr');
            $('#leve2').addClass('curr');
            return;
            //密码是纯数字的时候，密码强度为低
        }

        var re2 =/^[a-zA-Z]+$/;
        var result2 = re2.test(pwd);
        if(result2){
            $("#Slevel").show();
            $('#level').addClass('curr');
            $('#leve2').addClass('curr');
            return;
            //密码是纯字母的时候，密码强度为低
        }
        var re3 =/^[@#$%^&]+$/;
        var result3 = re3.test(pwd);
        if(result3){
            $("#Slevel").show();
            $('#level').addClass('curr');
            $('#leve2').addClass('curr');
            return;
            //密码是纯字符的时候，密码强度为低
        }
        var re4 =/^(?!\d+$)(?![a-zA-Z]+$)[a-zA-Z\d]+$/;
        var result4 = re4.test(pwd);
        if(result4){
            $("#Sleve2").show();
            $('#level').addClass('curr');
            $('#leve2').addClass('curr');
            $('#leve3').addClass('curr');
            return;
            //密码是字母+数字的时候，密码强度为中
        }
        var re5 =/^(?![a-zA-Z]+$)(?![@#$%^&]+$)[a-zA-Z@#$%^&]+$/;
        var result5 = re5.test(pwd);
        if(result5){
            $("#Sleve2").show();
            $('#level').addClass('curr');
            $('#leve2').addClass('curr');
            $('#leve3').addClass('curr');
            $('#leve4').addClass('curr');
            return;
            //密码是字母+特殊字符的时候，密码强度为中
        }

        var re6 =/^(?!\d+$)(?![@#$%^&]+$)[\d@#$%^&]+$/;
        var result6 = re6.test(pwd);
        if(result6){
            $("#Sleve2").show();
            $('#level').addClass('curr');
            $('#leve2').addClass('curr');
            $('#leve3').addClass('curr');
            $('#leve4').addClass('curr');
            return;
            //密码是字母+特殊字符的时候，密码强度为中
        }
        var re7 =/^(?!\d+$)(?![a-zA-Z]+$)(?![@#$%^&]+$)[\da-zA-Z@#$%^&]+$/;
        var result7 = re7.test(pwd);
        if(result7){
            $("#Sleve3").show();
            $('#level').addClass('curr');
            $('#leve2').addClass('curr');
            $('#leve3').addClass('curr');
            $('#leve4').addClass('curr');
            $('#leve5').addClass('curr');
            return;
            //密码是字母+特殊字符的时候，密码强度为中
        }
    }

</script>